<?php

class Flat_modul  extends CI_Model {
 

    public function __construct() {
        // Call the Model constructor
        parent::__construct();
    }
 
 
    /**
     * Поиск наглавной главная
     *
     * @return void
     * @author
     */

    public function request($id=0) {

        $data = false;
        $select_data = array();
        $DB2 = $this -> load -> database('adsent', TRUE, TRUE);

    	$select = "SELECT * FROM  `sflat` `r`  where r.id = $id  limit 1;"; 
	
        $q = $DB2 -> query($select); 
        $this -> load -> model('search/sale/flats_modul', 'flat');
        
        $data = $this -> flat -> req($q); 
     return $data;
	 
	 
	 }
		
		
   

}
